# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=vala-language-server
pkgver=0.48.7
pkgrel=1
pkgdesc="Code Intelligence for Vala"
url="https://github.com/vala-lang/vala-language-server"
arch="all"
license="LGPL-2.1-or-later"
makedepends="meson vala json-glib-dev glib-dev libgee-dev jsonrpc-glib-dev scdoc"
subpackages="$pkgname-dbg $pkgname-doc"
source="https://github.com/vala-lang/vala-language-server/releases/download/$pkgver/vala-language-server-$pkgver.tar.xz"

build() {
	abuild-meson \
		-Db_lto=true \
		-Dbuilder_abi=3.40 \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
c8249f23c8234aa69809421716abcfcf8d8454b0d92595342b461194186729794b6a3a0e88e4f60e3de2ab183234ffffec53ac2602f3d2b29ad29994c38c47b3  vala-language-server-0.48.7.tar.xz
"
